<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>修改音乐</title></head>
<body>
<h2>修改音乐</h2>
<form method="post" action="updateMusic">
    <input type="hidden" name="id" value="${music.id}">
    歌名：<input type="text" name="musicname" value="${music.musicname}"><br>
    演唱者：<input type="text" name="singer" value="${music.singer}"><br>
    排名：<input type="text" name="ranking" value="${music.ranking}"><br>
    类型：
    <select name="category_id">
        <option value="1" ${music.category_id == 1 ? 'selected' : ''}>流行</option>
        <option value="2" ${music.category_id == 2 ? 'selected' : ''}>古典</option>
        <option value="3" ${music.category_id == 3 ? 'selected' : ''}>经典</option>
        <option value="4" ${music.category_id == 4 ? 'selected' : ''}>国风</option>
        <option value="5" ${music.category_id == 5 ? 'selected' : ''}>儿童</option>
    </select><br>
    <input type="submit" value="修改">
</form>
</body>
</html>
